package com.fengye.school.json;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fengye.school.model.school.enums.SexType;
import com.fengye.school.model.school.enums.StudentType;

import java.io.IOException;
import java.text.SimpleDateFormat;

public class StudentTypeJsonSerializer extends JsonSerializer<StudentType> {
    @Override
    public void serialize(StudentType type, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        jsonGenerator.writeString(type.getName());
    }
}